

include ../../../GDALmake.opt

OBJ	=	ogrsfdriverregistrar.o ogrlayer.o ogrdatasource.o \
		ogrsfdriver.o ogrregisterall.o ogr_gensql.o \
		ogr_attrind.o ogr_miattrind.o ogrlayerdecorator.o \
		ogrwarpedlayer.o ogrunionlayer.o ogrlayerpool.o

BASEFORMATS = \
	-DAVCBIN_ENABLED \
	-DBNA_ENABLED \
	-DCSV_ENABLED \
	-DDGN_ENABLED \
	-DGML_ENABLED \
	-DGMT_ENABLED \
	-DGPX_ENABLED \
	-DMEM_ENABLED \
	-DNTF_ENABLED \
	-DREC_ENABLED \
	-DS57_ENABLED \
	-DSDTS_ENABLED \
	-DSHAPE_ENABLED \
	-DTAB_ENABLED \
	-DTIGER_ENABLED \
	-DVRT_ENABLED \
	-DKML_ENABLED \
	-DGEOJSON_ENABLED \
	-DGEOCONCEPT_ENABLED \
	-DXPLANE_ENABLED \
	-DGEORSS_ENABLED \
	-DGTM_ENABLED \
	-DDXF_ENABLED \
	-DPGDUMP_ENABLED \
	-DGPSBABEL_ENABLED \
	-DSUA_ENABLED \
	-DOPENAIR_ENABLED \
	-DPDS_ENABLED \
	-DHTF_ENABLED \
	-DAERONAVFAA_ENABLED \
	-DEDIGEO_ENABLED \
	-DSVG_ENABLED \
	-DIDRISI_ENABLED \
	-DARCGEN_ENABLED \
	-DSEGUKOOA_ENABLED \
	-DSEGY_ENABLED

CXXFLAGS :=     $(CXXFLAGS) -DINST_DATA=\"$(INST_DATA)\" $(BASEFORMATS)

ifeq ($(HAVE_OGDI),yes)
CXXFLAGS :=	$(CXXFLAGS) -DOGDI_ENABLED
endif

ifeq ($(HAVE_OCI),yes)
CXXFLAGS :=	$(CXXFLAGS) -DOCI_ENABLED
endif

ifeq ($(HAVE_SDE),yes)
CXXFLAGS :=	$(CXXFLAGS) -DSDE_ENABLED
endif

ifeq ($(HAVE_FGDB),yes)
CXXFLAGS :=	$(CXXFLAGS) -DFGDB_ENABLED
endif

ifeq ($(HAVE_OGR_PG),yes)
CXXFLAGS :=	$(CXXFLAGS) -DPG_ENABLED
endif

ifeq ($(HAVE_MYSQL),yes)
CXXFLAGS :=	$(CXXFLAGS) -DMYSQL_ENABLED
endif

ifeq ($(HAVE_INGRES),yes)
CXXFLAGS :=	$(CXXFLAGS) -DINGRES_ENABLED
endif

ifeq ($(PCIDSK_SETTING),internal)
CXXFLAGS :=	$(CXXFLAGS) -DPCIDSK_ENABLED
endif

ifeq ($(PCIDSK_SETTING),external)
CXXFLAGS :=	$(CXXFLAGS) -DPCIDSK_ENABLED
endif

ifeq ($(HAVE_FME),yes)
CXXFLAGS :=	$(CXXFLAGS) -DFME_ENABLED
endif

ifeq ($(ODBC_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DODBC_ENABLED
endif

ifeq ($(PGEO_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DPGEO_ENABLED
endif

ifeq ($(MSSQLSPATIAL_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DMSSQLSPATIAL_ENABLED
endif

ifeq ($(HAVE_DODS),yes)
CXXFLAGS :=	$(CXXFLAGS) -DDODS_ENABLED
endif

ifeq ($(HAVE_SQLITE),yes)
CXXFLAGS :=	$(CXXFLAGS) -DSQLITE_ENABLED
endif

ifeq ($(HAVE_GRASS),yes)
CXXFLAGS :=	$(CXXFLAGS) -DGRASS_ENABLED
endif

ifeq ($(HAVE_XERCES),yes)
CXXFLAGS :=	$(CXXFLAGS) -DILI_ENABLED
endif

ifeq ($(HAVE_NAS),yes)
CXXFLAGS :=	$(CXXFLAGS) -DNAS_ENABLED
endif

ifeq ($(HAVE_LIBKML),yes)
CXXFLAGS :=	$(CXXFLAGS) -DLIBKML_ENABLED
endif

ifeq ($(HAVE_DWGDIRECT),yes)
CXXFLAGS :=	$(CXXFLAGS) -DDWGDIRECT_ENABLED
endif

ifeq ($(HAVE_IDB),yes)
CXXFLAGS :=	$(CXXFLAGS) -DIDB_ENABLED
endif

ifeq ($(HAVE_PANORAMA),yes)
CXXFLAGS :=	$(CXXFLAGS) -DPANORAMA_ENABLED
endif

ifeq ($(HAVE_SQLITE),yes)
CXXFLAGS :=	$(CXXFLAGS) -DVFK_ENABLED
endif

ifeq ($(CURL_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DWFS_ENABLED
endif

ifeq ($(GEOMEDIA_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DGEOMEDIA_ENABLED
endif

ifeq ($(MDB_ENABLED),yes)
CXXFLAGS :=	$(CXXFLAGS) -DMDB_ENABLED
endif

ifeq ($(CURL_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DGFT_ENABLED
endif

ifeq ($(CURL_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DCOUCHDB_ENABLED
endif

ifeq ($(HAVE_FREEXL),yes)
CXXFLAGS :=	$(CXXFLAGS) -DFREEXL_ENABLED
endif

ifeq ($(HAVE_EXPAT),yes)
CXXFLAGS :=	$(CXXFLAGS) -DODS_ENABLED
endif

ifeq ($(HAVE_EXPAT),yes)
CXXFLAGS :=	$(CXXFLAGS) -DXLSX_ENABLED
endif

ifeq ($(CURL_SETTING),yes)
CXXFLAGS :=	$(CXXFLAGS) -DELASTIC_ENABLED
endif

ifeq ($(HAVE_SQLITE),yes)
CXXFLAGS :=	$(CXXFLAGS) -DOSM_ENABLED
endif

ifneq ($(LIBZ_SETTING),no)
CXXFLAGS :=	$(CXXFLAGS) -DPDF_ENABLED
endif

CPPFLAGS	:=	-I.. -I../.. $(GDAL_INCLUDE) $(CPPFLAGS)

default:	$(O_OBJ:.o=.$(OBJ_EXT))

clean:
	rm -f *.o $(O_OBJ)

$(O_OBJ):	../../../GDALmake.opt ../../swq.h

